fastlane_version "2.125.2"

default_platform :ios

platform :ios do

  desc "run all tests"
  lane :tests do
    test(workspace: "./MTHawkeyeDemo/MTHawkeye.xcworkspace", scheme: "MTHawkeyeTests")
  end

  lane :hawkeye_ci do
    $env_runtest = ENV["RUN_TEST"]
    test_ci() unless $env_runtest.to_s != "YES"
    
    $env_podlint = ENV["POD_LINT"]
    lint() unless $env_podlint.to_s != "YES"

    $env_builddemo = ENV["BUILD_DEMO"]
    build_demo() unless $env_builddemo.to_s != "YES"
  end

  lane :test do |options|
    scan(workspace: options[:workspace], scheme: options[:scheme], clean: true)
  end

  lane :test_ci do
    test(workspace: ENV["WORKSPACE"], scheme: ENV["TEST_SCHEME"])
  end

  desc "build demo"
  lane :build_demo do
    xcodebuild(workspace: ENV["WORKSPACE"], scheme: ENV["DEMO_SCHEME"])
  end

  desc "lint"
  lane :lint do
    pod_lib_lint(verbose: true, use_libraries: true, allow_warnings: true)
  end

  # release new version

  # pod push

  # doc

end